In php, Number of rows and columns in a 2 D array? - Stack Overflow I have a two dimensional array with unknown number of elements. ... foreach ($ two_darray as $key => $row) { foreach ($row as $key2 => $val) { .
php - Counting rows/records in a multidimensional array - Stack ... I have a set of nested arrays. [data] is the top level array. The lower ... Simplest method: $count = 0; foreach($mainarray as $subarray) $count += ...